html {
  box-sizing: border-box;
  //根元素字体大小；10 / 16 = 62.5%，采用rem单位时，1rem = 10px
  font-size: 62.5%;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
  &:before,
  &:after {
    box-sizing: inherit;
  }
}

/* colors */
$black: darken(#3f3a47, 15);
$pink: #c48c9f;
$purple: #897a99;
$darker-purple: #665d72;
$white: #f3f0f8;
$bg-color: darken($darker-purple, 20);

body {
  width: 100%;
  height: 100vh;
  background-color: $bg-color;
  font-family: sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.wrapper {
  position: relative;
  height: 250px;
  width: 250px;
  border-radius: 50%;
  background: linear-gradient($darker-purple, $pink);
  overflow: hidden;
  & > * {
    position: absolute;
  }
  .ground {
    background-color: $darker-purple;
    bottom: 0;
    height: 80px;
    width: 250px;
  }
  .moon {
    width: 12px;
    height: 12px;
    top: 45px;
    right: 75px;
    border-radius: 50%;
    border-bottom: 2px solid $white;
    transform: rotate(20deg);
  }
  .highway {
    box-sizing: content-box;
    right: 0;
    left: 0;
    margin: auto;
    width: 5px;
    opacity: 0.8;
    bottom: 0;
    border-bottom: 80px solid $black;
    border-left: 70px solid transparent;
    border-right: 70px solid transparent;
    transform: skew(30deg);
    &::after {
      content: "";
      position: absolute;
      opacity: 0.8;
      width: 0;
      right: 0;
      left: 0;
      margin: auto;
      border-bottom: 80px solid $white;
      border-left: 2px solid transparent;
      border-right: 2px solid transparent;
    }
  }
  .mountain-1 {
    width: 0;
    height: 0;
    left: -40px;
    bottom: 80px;
    border-bottom: 50px solid darken($darker-purple, 5);
    border-left: 90px solid transparent;
    border-right: 90px solid transparent;
  }
  .mountain-2 {
    width: 0;
    height: 0;
    right: -65px;
    bottom: 80px;
    border-bottom: 60px solid darken($darker-purple, 5);
    border-left: 150px solid transparent;
    border-right: 100px solid transparent;
  }
  .stars {
    width: 100%;
    height: 100%;
    .star {
      background-color: $white;
      width: 1px;
      height: 1px;
      position: absolute;
      animation-name: shining;
      animation-iteration-count: infinite;
      @for $i from 1 through 18 {
        &.s#{$i} {
          $speed: random(15) + 10 + s;
          $delay: -(random(25)) + s;
          left: random(92) + 0%;
          top: random(42) + 0%;
          animation-duration: $speed;
          animation-delay: $delay;
        }
      }
    }
  }
}
@keyframes shining {
  0%,
  100% {
    opacity: 1;
  }
  20%,
  80% {
    opacity: 0.5;
  }
  40% {
    opacity: 0;
  }
  80% {
    opacity: 0.75;
  }
}
